<include file="Public:header" />
<load href="__PUBLIC__/Js/Ajax/ThinkAjax-1.js" />
<load href="__PUBLIC__/Js/UserJs.js" />
<script language='javascript'>
function CheckForm(){
	if(document.form1.ePoints.value==""){
		alert("请输入委托交易额度！");
		document.form1.ePoints.focus();
		return false;
	}
	if(confirm('您确定要委托交易 '+document.form1.ePoints.value+' 吗？'))
	{
		return true;
	}else{
		return false;
	}
}
function change_fc(){
	if(document.form1.agree.checked==true){
		document.form1.Submit1.disabled=false;
	}else{
		document.form1.Submit1.disabled=true;
	}
}
</script>
<style>
.Agreement{width:90%; height:100px; overflow:auto; border:1px solid #7F9DB9; padding:2px; font-size:12px; line-height:24px;}
</style>
<div class="ncenter_box">
<div class="accounttitle"><h1>担保交易</h1></div>
<form action="__URL__/eb_sell_dbAC" method="post" name="form1" id="form1" onSubmit="{return CheckForm();}">
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="tab4">
      <tr>
        <td height="30" colspan="3" align="center"><span class="hong">确认提交卖出后，请仔细确认自己银行信息的正确性，以免交易过程中银行信息不正确而导致买家无法汇款交易。</span></td>
      </tr>
      <tr>
        <td width="25%" height="30" align="right">现金币余额：</td>
        <td colspan="2"><span class="hong">{$rs['agent_use']}</span></td>
      </tr>
      <tr style="display:none">
        <td width="25%" height="30" align="right">交易币种：</td>
        <td colspan="2">
        <select name="s_type">
        <option value="0" selected="selected">动态奖金</option>
        <option value="1">静态奖金</option>
        </select>
        </td>
      </tr>
      <tr>
        <td height="30" align="right">会员编号：</td>
        <td width="15%"><input name="Userid" type="text" id="Userid" maxlength="20"/></td>
        <td width="60%"><div id="ePoints1" class="info"><div class="focus_r"><div class="msg_tip">买入会员编号</div></div></div></td>
      </tr>
      <tr>
        <td height="30" align="right">交易额度：</td>
        <td width="15%"><input name="ePoints" type="text" id="ePoints" maxlength="9" onkeyup="value=value.replace(/[^0-9]/g,'')" onBlur="value=value.replace(/[^0-9.]/g,'');tot_price();"/></td>
        <td width="60%"><div id="ePoints1" class="info"><div class="focus_r"><div class="msg_tip">交易额度</div></div></div></td>
      </tr>
      <tr>
        <td height="30" align="right">手续费：</td>
        <td width="15%"><input name="sxf" type="text" id="sxf" value="{$str2}" size="12" maxlength="12" readonly="readonly" /></td>
        <td width="60%"><input name="ks" type="hidden" id="ks" value="{$ks}"/><div class="info"><div class="focus_r"><div class="msg_tip">手续费 {$str2}%</div></div></div></td>
      </tr>
      <tr>
        <td height="30" align="right">实际扣除：</td>
        <td colspan="2"><span style="color:#960" id="tot_price">0</span></td>
      </tr>
      <tr>
        <td width="24%" height="30" align="right">备注：</td>
        <td colspan="2"><textarea name="bzcontent" cols="60" rows="4"></textarea>(200字符内)</td>
      </tr>
      <tr>
        <td width="24%" height="30" align="right">请阅读协议：</td>
        <td colspan="2">
        <div class="Agreement">{$eb_tcp}</div>
        </td>
      </tr>
      <tr>
        <td width="24%" height="30" align="right"></td>
        <td colspan="2"><label>
        <input name="agree" type="checkbox" id="agree" value="1" checked="checked" onpropertychange="change_fc()"/>
        我已经阅读并同意委托交易系统使用协议。</label></td>
      </tr>
      <tr>
        <td height="30" align="right">二级密码：</td>
        <td colspan="2"><input name="pass2" type="password" id="pass2"/></td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td colspan="2"><input type="submit" name="Submit1" value="确定卖出" class="btn1" id="Submit1" /></td>
      </tr>
    
</table>
</form>
</div>
</body>
</html>
<script type="text/javascript">
function tot_price(){
	var one_price = document.getElementById('sxf').value / 100;//单价
	var sNun	= document.getElementById('ePoints').value;//数量
	var t_price = formatNumberUnitsDivd(parseFloat(sNun * one_price)+parseFloat(sNun));
	document.getElementById('tot_price').innerHTML = t_price+'';
}
function formatNumberUnitsDivd(num) {
	return num.toFixed(2);
}
</script>